

package Q44;
import javax.swing.JOptionPane;
import java.text.DecimalFormat;

public class TestTest {
    public static void main(String[]args){
        DecimalFormat ft = new DecimalFormat("#.###");
        String input1 = JOptionPane.showInputDialog(null,"Enter value x","HEloo",JOptionPane.QUESTION_MESSAGE);
        String input2 = JOptionPane.showInputDialog(null,"Enter y value" , "HELLOO",JOptionPane.QUESTION_MESSAGE);
        double xvalue = Double.parseDouble(input1);
        double yvalue = Double.parseDouble(input2);
        Test t1 = new Test();
        Test t2 = new Test (xvalue , yvalue);
        
        JOptionPane.showMessageDialog(null,"The ans is = "+ft.format(t1.distance(t2)),"ok",JOptionPane.PLAIN_MESSAGE);
}
}